package com.six.library.utils


class PageUtil<T> {
    //每页记录数,默认每页显示10条记录
    var pageSize = 10

    //页面索引
    var pageIndex = 0

    //总记录数
    var total = 0

    //总页数
    var pages = 0
        get() = if (this.total % pageSize > 0) {
            this.total / pageSize + 1;
        } else {
            this.total / pageSize;
        }

    //数据集合
    var records: List<T>? = null
}